//
//  MaskTabFooter.m
//  TenMinDemo
//
//  Created by Shawn Li on 2021/3/8.
//  Copyright © 2021 CYXiang. All rights reserved.
//

#import "MaskTabFooter.h"
@interface MaskTabFooter ()

@property (weak, nonatomic) IBOutlet UIView *bgView;

@end

@implementation MaskTabFooter

//INITFROMXIB

- (void)awakeFromNib{
    [super awakeFromNib];
    CGRect frame = self.bgView.bounds;
    frame.size.width = SCREEN_WIDTH - 30;
    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect: frame byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(10,10)];
      //创建 layer
      CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
      maskLayer.frame = frame;
      //赋值
      maskLayer.path = maskPath.CGPath;
    self.bgView.layer.mask = maskLayer;
}

@end
